package com.huisenky.smallidea.convert.annotation;

import com.huisenky.smallidea.convert.enums.InjectType;
import com.huisenky.smallidea.convert.interfaces.Injector;

import java.lang.annotation.*;

/*
    加在old的class上
 */
@Target({ElementType.FIELD})
@Retention(RetentionPolicy.RUNTIME)
@Documented
@Inherited
public @interface SmallResInject {
    /**
     * injector类
     *     @SmallResInject(CommInjector.Emp.class)
     */
    Class<? extends Injector<?>> value();

    /**
     * inject方式
     */
    InjectType injectType() default InjectType.CODE_NAME;

    /**
     * 默认"" 不替代injectType 如果不为""替代injectType
     */
    String newValue() default "";
}
